package com.ngc.mall.core.enumeration;

import java.util.stream.Stream;

/**
 *
 * 消息状态枚举类
 * @author: chenxiaolin
 * @date 2023/11/8 15:11
**/
public enum MessageStatus {
    UNREAD(0,"未读"),
    READ(1,"已读");

    private Integer value;

    MessageStatus(int value,String description) {
        this.value=value;
    }

    public Integer getValue(){
        return this.value;
    }

    public static MessageStatus toType(int value){
        return Stream.of(MessageStatus.values()).filter(c->c.value==value).findAny().orElse(null);
    }
}
